
import request from '@/utils/request'

// 执法分页查询
export function getExecutionPage(params) {
  return request({
    url: '/admin/execution/page' ,
    method: 'get',
    params
  })
}

// 批量删除执法记录
export function deleteExecution(id) {
  return request({
    url: `/admin/execution`,
    method: 'delete',
    params: { ids: [id] }
  })
}

//执法记录修改
export function updateExecution(data) {
  return request({
    url: `/admin/execution/update`,
    method: 'put',
    data  // 添加这个参数
  })
}

// 新增违法记录
export function addExecution(data) {
  return request({
    url: '/admin/execution',
    method: 'post',
    data
  })
}